Examples of devices for writing/reading digital data to/from a recording medium include a read/write device for a DVD-RAM, which is specified in the International Standard ECMA-272, and the like.
When a disk is inserted or the power is turned on, the read/write device first verifies written contents in a defect management information area (DMA), and the like, which are allocated in lead-in and lead-out areas, to check whether or not the DVD-RAM has been physically formatted. If the DVD-RAM has not been physically formatted, the read/write device waits until an instruction to physically format the DVD-RAM is received from a higher-level device or a user.
If the DVD-RAM has been physically formatted, the read/write device performs write preparation processing including calibration processing and logical consistency verification, and then enters a state of waiting for an instruction from the user or the higher-level device. On the receipt of some “command”, the read/write device identifies its kind. If the received command is a write command, the read/write device performs write processing of writing user data. If the received command is a read command, a format command, a disk eject command, or the like, the read/write device performs the corresponding processing thereof. Usually, the above processing successfully ends.
However, there is a very rare a case where the processing cannot be completed as usual for reasons that cannot be expected. For example, if the read/write device fails in writing user data because a user area of the optical disk includes a defect, the read/write device performs error processing such as retry processing and alternate processing. Usually, the read/write device used for a DVD-RAM, performs write processing of user data, the user data is actually read to check whether or not the user data has been successfully written, and the alternate processing that allocates user data to a spare area instead of a user area is performed if necessary, thereby increasing the reliability of the optical disk. Information about the correspondence between an address of the user area and that of the spare area, which shows the result of this alternate processing, is standardized in the ECMA-272 so that the information is written to DMA as DL.
In addition, as a management method for managing a recorded area on a recording medium, Japanese Patent Application Laid-Open No. Hei 11-86418 describes the recording device that manages a recordable area on a block basis (a block is a unit of read or write) using a bit map indicating whether or not each block has already been written.